(add-to-list 'load-path "~/.emacs.d")
(add-to-list 'load-path "~/.emacs.d/modules")

;; all styles
(load-file "~/.emacs.d/style.el")
;; 3rd party from modules folders
(load-file "~/.emacs.d/3rdparty.el")
;; kbd bindings
(load-file "~/.emacs.d/kbd.el")

(setq c-basic-offset 2) ; Use four spaces for indentation.
(setq c-offsets-alist 
      '((member-init-intro . ++) ; Extra indentation for initializer lists.
	(innamespace . 0) ; No indentation for namespaces.
	(substatement-open . 0))) ; no indentation for substatement-open

(desktop-save-mode 1)
(savehist-mode 1)
(setq history-length 250)
(add-to-list 'desktop-globals-to-save 'file-name-history)

(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(c-default-style (quote ((c-mode . "gnu") (c++-mode . "gnu") (awk-mode . "awk") (other . "gnu"))))
 '(cscope-database-file "cscope.out")
 '(cscope-index-file "cscope.files")
 '(ede-auto-add-method (quote multi-ask))
 '(load-home-init-file t t)
 '(paren-mode (quote sexp) nil (paren))
 '(scroll-conservatively 100000))

(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(default ((t (:stipple nil :slant normal :weight normal :height 74 :width normal :family "microsoft-consolas")))))
 
(defvar user-temporary-file-directory
  (concat temporary-file-directory user-login-name "/"))
(make-directory user-temporary-file-directory t)

(setq backup-by-copying t)
(setq backup-directory-alist
      `(("." . ,user-temporary-file-directory)
        (,tramp-file-name-regexp nil)))
(setq auto-save-list-file-prefix
      (concat user-temporary-file-directory ".auto-saves-"))
(setq auto-save-file-name-transforms
      `((".*" ,user-temporary-file-directory t)))
